

\providecommand{\cpp}{C\kern-0.05em\texttt{+\kern-0.03em+} }
\providecommand{\Cpp}{\cpp}

\usepackage{pdfpages}
%\usepackage{pgf}

\usepackage{listings}%[2000/08/23]
%\usepackage{graphicx}
\usepackage{multicol}

\usepackage{tikz}

\lstnewenvironment{cplus}
    {\lstset{language=c++,basicstyle=\scriptsize,frame=}}
    {}


\lstnewenvironment{cplus3}
    {\lstset{language=c++,basicstyle=\scriptsize,frame=}}
    {}


\lstnewenvironment{java}
    {\lstset{language=java,basicstyle=\scriptsize,frame=}}
    {}

\lstnewenvironment{java2}
    {\lstset{language=java,basicstyle=\scriptsize}}
    {}

\lstdefinelanguage{Haskell-custom}
{%columns=flexible,
escapeinside={--@}{@--},breaklines=true,breakatwhitespace=true%
language=Haskell,basicstyle=\color{lightblue}\ttfamily,keywordstyle=\ttfamily,%
morekeywords={class,instance,type,newtype,data,where,deriving,import},%
lineskip=-.1\baselineskip,morekeywords={concept,requires,concept_map}}

\lstnewenvironment{hask}[1][\small]{\lstset{language=Haskell-custom,%
    style=numbers,basicstyle=\color{lightblue}#1\ttfamily,keywordstyle=#1\ttfamily,%
    style=bold-keywords,style=frametb}}{}

\providecommand{\haskellinl}[2][\normalsize]{{\lstinline[language=Haskell-custom,%
basicstyle=\color{lightblue}#1\ttfamily,keywordstyle=#1\ttfamily]@#2@}}%

\providecommand{\haskinl}[2][\normalsize]{{\lstinline[language=Haskell-custom,%
basicstyle=\color{lightblue}#1\ttfamily,mathescape=true,keywordstyle=#1\ttfamily]@#2@}}%

\lstdefinestyle{markers}{rangeprefix=\{-\:\ ,%
includerangemarker=false,%
rangesuffix=\ \:-\}}%

\providecommand{\haskellinput}[3][\small]{{\lstinputlisting[language=Haskell-custom,basicstyle=\color{lightblue}#1\ttfamily,keywordstyle=#1\ttfamily,%
style=bold-keywords,style=numbers,style=frametb,style=markers,firstnumber=1,linerange={#3}]{#2}}}

\providecommand{\haskellinputnonumber}[3][\small]{{\lstinputlisting[language=Haskell-custom,basicstyle=\color{lightblue}#1\ttfamily,keywordstyle=#1\ttfamily,%
style=bold-keywords,style=frametb,xleftmargin=8pt,xrightmargin=8pt,style=markers,firstnumber=1,linerange={#3}]{#2}}}

